<?php
/**
 * 地区
 *
 *
 * @好商城 (c) 2015-2018 33HAO Inc. (http://www.33hao.com)
 * @license    http://www.33 hao.c om
 * @link       交流群号：138182377
 * @since      好商城提供技术支持 授权请购买shopnc授权
 */


defined('In33hao') or exit('Access Invalid!');

class authControl extends mobileHomeControl
{

    public function __construct()
    {
        parent::__construct();
    }

    public function indexOp()
    {
        $model = Model();
        $type = $_POST['type'];
        //type 1.登录 2.注册  3.夺宝余额支付
        switch ($type) {
            case 1:
                $fields = 'member_name,member_mobile,member_points,available_predeposit,member_avatar,member_paypwd,member_passwd';
                $condition['member_id'] = $_POST['mid'];
                $res = $model->table('member')->field($fields)->where($condition)->find();
                break;
            case 2:
                $fields = 'member_name,member_mobile,member_points,available_predeposit,member_avatar,member_paypwd,member_passwd';
                $condition['member_id'] = $_POST['mid'];
                $res = $model->table('member')->field($fields)->where($condition)->find();
                break;
            case 3:
                $model_pd = Model('predeposit');
                $data = array();
                $data['member_id'] = $_POST['member_id'];
                $data['member_name'] = $_POST['member_name'];
                $data['amount'] = $_POST['money'];
                $data['order_sn'] = $_POST['order_sn'];
                $res = $model_pd->changePd('yungou_pay',$data);
                break;
            default :
                $res = '小屁孩，滚回去玩泥巴！';
        }
        output_data($res);
    }



}
